import request from '@/utils/request'

// 查询巡检项列表
export function listInspectionItem(query) {
  return request({
    url: '/ldzl-sb/inspection/item/list',
    method: 'get',
    params: query
  })
}

// 查询巡检项详细
export function getInspectionItem(id) {
  return request({
    url: '/ldzl-sb/inspection/item/' + id,
    method: 'get'
  })
}

// 新增巡检项
export function addInspectionItem(data) {
  return request({
    url: '/ldzl-sb/inspection/item',
    method: 'post',
    data: data
  })
}

// 修改巡检项
export function updateInspectionItem(data) {
  return request({
    url: '/ldzl-sb/inspection/item',
    method: 'put',
    data: data
  })
}

// 删除巡检项
export function delInspectionItem(id) {
  return request({
    url: '/ldzl-sb/inspection/item/' + id,
    method: 'delete'
  })
}

// 根据巡检配置ID获取巡检项列表
export function getItemsByConfigId(configId) {
  return request({
    url: '/ldzl-sb/inspection/item/config/' + configId,
    method: 'get'
  })
}

// 批量删除巡检项
export function delInspectionItems(ids) {
  return request({
    url: '/ldzl-sb/inspection/item/' + ids,
    method: 'delete'
  })
} 